<template>
    <div>
        <van-nav-bar id="reset" title="公告列表" left-arrow @click-left="backHandle" fixed z-index="100" />


        <div class="pageCon fuPage">


            <div class="topBox">
                <img src="../../assets/notice/tieShi.png" alt="">({{ noticeList.length }})
            </div>


            <div class="noticeBox" v-if="noticeList.length != 0">
                <div v-for="(item, index) in noticeList" :key="index">
                    <img src="../../assets/notice/img.png" alt="">
                    <div>
                        <div><span>公告</span><span>{{ item.noticeStart }}</span></div>
                        <div>{{ item.noticeContent }}
                        </div>
                    </div>
                </div>
            </div>


            <div class="emptyBox" v-else>
                <img src="../../assets/tip_content.png">
            </div>

            
        </div>



    </div>

</template>

<script>
import { listNotice } from '../../network/notice'
export default {
    name: 'HomeR',
    data() {
        return {
            active: '',
            noticeList: [],
            isLoading: false

        }
    },
    mounted() {

    },
    methods: {



        backHandle() {
            this.$router.back()
        },

        getList() {
            listNotice().then(res => {
                if (res.flag) {
                    this.isLoading = false
                    this.noticeList = res.data.filter(item => {
                        return item.noticeFlag == localStorage.userType || item.noticeFlag == 0
                    })
                }
            })
        },

        pullHandle() {
            this.isLoading = true
            this.getList()
        },




    },
    created() {

        this.getList()
    },
    //计算属性
    computed: {

    },
    filters: {

    }

}

</script>

<style lang='less' scoped>
.pageCon {
    padding-top: 180px !important;
    box-sizing: border-box;
    position: relative;
    width: 100%;
    // height: 100vh;
    background-color: #EEF1F7;
    // overflow: hidden;
}


#reset /deep/ .van-nav-bar__left .van-nav-bar__text,
#reset /deep/ .van-nav-bar__left .van-icon {
    color: #333 !important;
}



.topBox {
    position: fixed;
    top: 80px;
    box-sizing: border-box;
    padding: 32px 38px;
    width: 750px;
    background: linear-gradient(180deg, #ECFBF6, #FAFAFA);
    font-family: Source Han Sans CN;
    font-weight: 400;
    font-size: 28px;
    color: #01CBD7;
    z-index: 20;
}

.topBox>img {
    width: 107px;
    height: 33px;
}


.noticeBox {
    width: 100%;
    background-color: #fff;
}

.noticeBox>div {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    padding: 24px 0px 0px 24px;
    width: 100%;
    /* background-color: aqua; */
    font-family: Source Han Sans CN;
    font-weight: 400;
    font-size: 30px;
    color: #333333;
}

.noticeBox>div>img {
    margin-right: 22px;
    width: 88px;
    height: 88px;
    border-radius: 20px;
}

.noticeBox>div>div>div:first-child {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.noticeBox>div>div>div:first-child>span:nth-child(2) {
    font-size: 24px;
    color: #CCCCCC;
}

.noticeBox>div>div {
    flex: 1;
    /* background-color: aquamarine; */
    padding: 0 30px 34px 0;
    border-bottom: 2px solid #f2f2f2;
}

.noticeBox>div>div>div:last-child {
    margin-top: 14px;
    font-family: Source Han Sans CN;
    font-weight: 400;
    font-size: 24px;
    color: #999999;
}


.emptyBox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.emptyBox>img {
    margin-top: 400px;
    width: 374px;
    height: 314px;
}


.itemBox {
    box-sizing: border-box;
    padding: 44px 30px 44px 44px;
    width: 100%;
    border-bottom: 2px solid #f2f2f2;
    background: #fff;
}

.itemBox>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-family: Source Han Sans CN;
    font-weight: 400;
    font-size: 28px;
    color: #333333;
    line-height: 38px;

}

.itemBox>div:nth-child(2) {
    margin-top: 12px;
}

.itemBox>div:nth-child(2)>span {
    font-size: 24px;
    color: #999999;
}



/deep/ .van-tabs__line {
    background: #1BB26A !important;
}



.duiBox {
    position: relative;
    width: 642px;
    // height: 590px;
    background: #FAFAFA;
    border-radius: 20px;
    color: #333333;
    line-height: 64px;
    font-family: Source Han Sans CN;

}

.duiBox>div:first-child {
    padding-top: 24px;
    text-align: center;
    width: 100%;
    font-weight: bold;
    font-size: 34px;

}

.duiBtn {
    // position: absolute;
    // bottom: 0px;
    display: flex;
    align-items: center;
    width: 100%;
    height: 90px;
    border-top: 2px solid #f2f2f2;
}

.duiBtn>div {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 28px;
}

.duiBtn>div:last-child {
    border-left: 2px solid #f2f2f2;
}

.inputBox {
    box-sizing: border-box;
    padding: 24px 48px;
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 28px;
}

.inputBox>input {
    width: 60%;
    border: none;
    outline: none;
    background: transparent;
}


.imgBox {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    padding-top: 24px;
    border-top: 1px solid #f2f2f2;
    width: 100%;
}

.imgBox>span {
    font-size: 28px;
    color: #999;
}

.imgBox>div>img {
    margin: 16px 16px 16px 0;
    width: 100px;
    height: 100px;
    background: aqua;
    border-radius: 16px;
}


.line1>span:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: center;

}

.applyBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 136px;
    height: 48px;
    border-radius: 24px;
    border: 1px solid rgba(27, 178, 106, .5);
    font-family: Source Han Sans CN;
    font-weight: bold;
    font-size: 20px;
    color: #1BB26A !important;
}

.applyBtn1 {
    margin-left: 16px;
    border: 1px solid rgba(255, 22, 22, 0.5);
    color: rgba(255, 22, 22) !important;
}
</style>